import { FORMTYPEDATA } from "../../../type";
export interface RadioComponentProps {
  modelValue?: number | string | null;
}
export interface RadioComponentData {
  options: {
    label: string | number;
    value: string | number;
  }[];
}

export const RadioItemAttr: FORMTYPEDATA<
  RadioComponentProps,
  RadioComponentData
> = {
  componentStyle: {
    width: 200,
  },
  // 传给给组件的属性，默认会吧所有的props都传递给控件
  componentProps: {
    modelValue: null,
  },
  // 组件选项
  // 数据来源
  componentData: {
    options: [
      { label: "是", value: 1 },
      { label: "否", value: 0 },
    ],
  },
  // 是否隐藏
  hidden: false,
  // 组件显隐规则
  hiddenRules: [],
  elFormItemProps: {
    // 是否必选
    required: false,
    error: "",
    showMessage: true,
    inlineMessage: "",
    labelPosition: "",
    rules: [],
  },
};
